import math

def sphereToRect(R, theta, phi):
	x = R * math.sin(theta) * math.cos(phi)
	y = R * math.sin(theta) * math.sin(phi)
	z = R * math.cos(theta)

	return (x,y,z)



print '%5.3f %5.3f %5.3f\n' % sphereToRect(2, math.pi/4, math.pi/2)